# Contributor: Maxim Karasev <begs@disroot.org>
# Maintainer: Maxim Karasev <begs@disroot.org>
pkgname=nvim-treesitter
pkgver=0.0.0_git20220309
_commit=90485c890503f973271db1ae02ddba6d6fd46397
pkgrel=1
pkgdesc="nvim treesitter configurations and abstraction layer"
url="https://github.com/nvim-treesitter/nvim-treesitter"
arch="noarch"
license="Apache-2.0"
subpackages="$pkgname-doc"
source="https://github.com/nvim-treesitter/nvim-treesitter/archive/$_commit/nvim-treesitter-$pkgver.tar.gz"
builddir="$srcdir/nvim-treesitter-$_commit"
options="!check" # requires entire neovim tree

package() {
	install -d "$pkgdir"/usr/share/nvim/site
	cp -ra lua autoload after doc plugin ftdetect queries \
		"$pkgdir"/usr/share/nvim/site
	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

doc() {
	default_doc
	amove usr/share/nvim/site/doc
}

sha512sums="
5124dcfefbe84e5ef28fd2021b0580b9da8cdfba7d76e5f7174f71a2765bffa7e9bb073d351c039392e525c0633da3a2c5c0b1152d151df3610b6c3b06fbb18d  nvim-treesitter-0.0.0_git20220309.tar.gz
"
